<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>Your new friends</title>
    <script type="text/javascript" src="/voteup/resources/js/jquery-1.6.1.js"></script>
    <script type="text/javascript" src="/voteup/resources/js/stylescript.js"></script>
</head>
<body>
<c:import url="/WEB-INF/jsp/header.jsp"/>
<c:import url="/WEB-INF/jsp/menu.jsp"/>
<center>
    <c:if test="${not empty msg}">
        <p class="error">${msg}</p>
    </c:if>
    <c:if test="${empty friends}">
        <h3>There are no more friendship propose</h3>
    </c:if>
    <c:if test="${not empty friends}">
        <p>

        <h3>These people wanted to be your friend</h3></p>
        <ul class="pane-list">
            <c:forEach items="${friends}" var="friend">
                <li class="nocursor">
                    <table width="100%" cellspacing="4" cellpadding="3">
                        <tr>
                            <td align="left">
                                <a href="/voteup/persons/${friend.personId}">
                                    <p align="center"><img src="/voteup/resources/img/avatars/${friend.avatar}.jpg"
                                                           width="60"
                                                           height="80"
                                                           border="0"></p>
                                </a></td>
                            <td>
                                <a href="/voteup/persons/${friend.personId}">
                                    <p align="center">${friend.lastName} ${friend.firstName} ${friend.middleName} </p>
                                </a>
                            </td>
                            <td align="justify">
                                <a href="/voteup/messages/sendmessage?id=${friend.personId}">Send message</a><br>
                                <a href="/voteup/newfriends/${friend.personId}/confirm">Confirm friendship</a><br>
                                <a href="/voteup/newfriends/${friend.personId}/rejectfriend">Reject friendship</a>
                            </td>
                        </tr>
                    </table>
                </li>
            </c:forEach>
        </ul>
    </c:if>
</center>
</body>
</html>